Skip to content

Fix subtype parsing for strain names with spaces - #31

Merged
jpalmer37 merged 2 commits into
mainfrom
bug/nextclade-subtype-parse
Nov 6, 2026
Merged

jpalmer37 merged 2 commits into
mainfrom
bug/nextclade-subtype-parse

Conversation

@jpalmer37

@jpalmer37 jpalmer37 commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

The subtype regex in modules/nextclade/nextclade.nf couldn't read a strain name with a space, so a header like A/Fancy chicken/NL/FAV-0033-1-2021/2021(H5N1) named every VCF __unknown__. The strain part of the regex now accepts anything except parentheses. The unknown fallback is unchanged.

Tested with a local Nextflow run on 5 H5N1 samples against the PV312101.1-PV312108.1 chicken2021 bundle and 1 H1N1 sample against wisconsin588: all 44 Nextclade VCFs are named __PV3121xx.1__H5N1__ or __MW6260xx.1__H1N1__, and CHROM matches the name. The sed expression also resolves the subtype for all 120 reference.fasta files under the local references folder. tests/ was not run, because no test reads this line.

jpalmer37 and others added 2 commits November 5, 2026 15:39
A reference header with no (HxNy) now fails instead of naming VCFs unknown, because fluscan-db parses that token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Restores everything else in this PR to main, including the unknown fallback.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@jpalmer37
jpalmer37 marked this pull request as ready for review November 6, 2026 18:07
@jpalmer37
jpalmer37 merged commit 99109a6 into main Nov 6, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant